export const on = (customEventType, callback, element = document.body) => {
  // console.warn('on: ', element.addEventListener)
  element.addEventListener(customEventType, callback)
}

export const emit = (customEventType, detail = {}, element = document.body) => {
  // console.warn('emit: ', element)
  const event = new CustomEvent(customEventType, {
    bubbles: true,
    detail,
  })
  element.dispatchEvent(event)
}

export const CESIUM_VIEWER_INITIALIZATION = 'CESIUM_VIEWER_INITIALIZATION'

export const THREE_SCENE_INITIALIZATION = 'THREE_SCENE_INITIALIZATION'

export const UE_ALREADY_3D = 'UE_ALREADY_3D'
export const UE_CAMERA_START = 'UE_CAMERA_START'
export const UE_CAMERA_STOP = 'UE_CAMERA_STOP'
